package com.pth.test;

import java.util.Iterator;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.pth.model.UserInfo;
import com.pth.service.UserInfoService;

public class testDome extends ActionSupport {

	private UserInfo userInfo;
	
	private List<UserInfo> infos;
	
	private UserInfoService infoService;

	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	public List<UserInfo> getInfos() {
		return infos;
	}

	public void setInfos(List<UserInfo> infos) {
		this.infos = infos;
	}

	public UserInfoService getInfoService() {
		return infoService;
	}

	public void setInfoService(UserInfoService infoService) {
		this.infoService = infoService;
	}
	
	@Override
	public String execute() throws Exception {

		infos=infoService.getUserByeidNOpager(1);
		JXLUtil.writerExcel(infos);
		return SUCCESS;
	}
	
	
}
